package com.internship.service;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.internship.dao.BjdmbDao;
import com.internship.model.Bjdmb;
import com.internship.page.Page;

@Service
public class BjdmbService {
	private final int PAGE_SIZE = 10;
	@Autowired
	private BjdmbDao bjdmbDao;

	public Page<Bjdmb> getBjdmbList(String SSXSXYDM,String SSZYDM,int pageNumber) {
		Page<Bjdmb> page = new Page<Bjdmb>(pageNumber, PAGE_SIZE);
		List<Bjdmb> list = bjdmbDao.getBjdmbList(SSXSXYDM, SSZYDM, page);
		page.setResultList(list);
		return page;
	}
	public List<Bjdmb> getBjdmbList() {
		List<Bjdmb> list = bjdmbDao.getBjdmbList();
		return list;
	}
	public List<Bjdmb> getBjdmb(String SSXSXYDM,String SSZYDM) {
		List<Bjdmb> list = bjdmbDao.getBjdmb(SSXSXYDM,SSZYDM);
		return list;
	}
	public List<Bjdmb> getBjdmbByTh(String BZRZGH) {
		List<Bjdmb> list = bjdmbDao.getBjdmbByTh(BZRZGH);
		return list;
	}
	public int addBjdmb(Bjdmb bjdmb) {
		return bjdmbDao.addBjdmb(bjdmb);
	}
	public int updateBjdmb(Bjdmb bjdmb) {
		return bjdmbDao.updateBjdmb(bjdmb);
	}
	public int delBjdmb(String BJDM) {
		return bjdmbDao.delBjdmb(BJDM);
	}
	public int delAll(String[] ids) {
		return bjdmbDao.delAll(ids);
	}

}
